home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / OpenDoc Utilities / Interfaces / ODNewObj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  952 b   |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ODNewObj.h
  3.  
  4.     Contains:    Abstract wrapper for instantiating objects by class-name
  5.  
  6.     Owned by:    Jens Alfke
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>     6/27/96    jpa        1361886: Return error string
  13.          <2>     5/24/96    jpa        1.1MRD: pragma internal eliminates NOPs.
  14.  
  15. */
  16.  
  17. #ifndef _ODNEWOBJ_
  18. #define _ODNEWOBJ_
  19.  
  20. #ifndef _ODTYPES_
  21. #include "ODTypes.h"
  22. #endif
  23.  
  24. class SOMObject;
  25.  
  26. #ifdef _OD_IMPL_SHARE_UTILS_
  27. #pragma import on
  28. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  29. #pragma internal on
  30. #endif
  31.  
  32. #undef DEFAULT
  33. #ifdef __cplusplus
  34. #define DEFAULT(X)    =(X)
  35. #else
  36. #define DEFAULT(X)
  37. #endif
  38.  
  39. extern "C" {
  40.  
  41.     SOMObject*    ODNewObject( const char *className, Str255 errorString DEFAULT(kODNULL) );
  42.     
  43.     ODBoolean    ODClassExists( const char *className );
  44.  
  45.  
  46. #ifdef _OD_IMPL_SHARE_UTILS_
  47. #pragma import off
  48. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  49. #pragma internal reset
  50. #endif
  51.  
  52. #endif /*ODNEWOBJ*/